package com.ck.dynamic.route.gateway.conf;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @Classname GatewayConfig
 * @Description 配置
 * @Date 2021/10/26 17:39
 * @Created by lpc
 */
@Configuration
@Data
public class GatewayConfig {

    public static final long DEFAULT_TIMEOUT = 30000;
    @Value("${spring.cloud.nacos.discovery.server-addr}")
    public static String NACOS_SERVER_ADDR;
    @Value("${spring.cloud.nacos.discovery.namespace}")
    public static String NACOS_NAMESPACE;
    @Value("${nacos.gateway.route.config.data-id}")
    public static String NACOS_ROUTE_DATA_ID;
    @Value("${nacos.gateway.route.config.group}")
    public static String NACOS_ROUTE_GROUP;


//    @Value("${spring.cloud.nacos.discovery.server-addr}")
//    public void setNacosServerAddr(String nacosServerAddr){
//        NACOS_SERVER_ADDR = nacosServerAddr;
//    }
//
//    @Value("${spring.cloud.nacos.discovery.namespace}")
//    public void setNacosNamespace(String nacosNamespace){
//        NACOS_NAMESPACE = nacosNamespace;
//    }
//
//    @Value("${nacos.gateway.route.config.data-id}")
//    public void setNacosRouteDataId(String nacosRouteDataId){
//        NACOS_ROUTE_DATA_ID = nacosRouteDataId;
//    }
//
//    @Value("${nacos.gateway.route.config.group}")
//    public void setNacosRouteGroup(String nacosRouteGroup){
//        NACOS_ROUTE_GROUP = nacosRouteGroup;
//    }

}
